package com.superbytecode.redis.properties;

import com.superbytecode.redis.lock.LockType;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName: superbytecode-beacon
 * @Package: com.superbytecode.framework.redis.properties
 * @ClassName: LockProperties
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2023/11/21 14:54
 * @Version: V1.0
 * @Copyright: 2023 www.super-bytecode.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@Data
@ConfigurationProperties(prefix = "spring.lock")
public class LockProperties {
    /**
     * 加锁失败抛出的异常信息
     * 支持spEL，允许的参数有方法的入参以及 #waitTime
     */
    String errorMsg = "系统繁忙，请稍后再试。";
    /**
     * 锁类型
     */
    private LockType type = LockType.REDIS_REENTRANT_LOCK;
    /**
     * 锁key的前缀
     */
    private String prefix = "@lock";
}